package com.igeekhome.mapper;

import com.igeekhome.dto.WaybillDto;
import com.igeekhome.pojo.WWaybill;
import com.igeekhome.pojo.WWaybillExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WWaybillMapper {
    int countByExample(WWaybillExample example);

    int deleteByExample(WWaybillExample example);

    int deleteByPrimaryKey(Integer waybillId);

    int insert(WWaybill record);

    int insertSelective(WWaybill record);

    List<WWaybill> selectByExample(WWaybillExample example);

    /**
     * @Description 根据条件搜索运单
     * @Param WaybillDto 传递方法
     * @Return List<WaybillDto>
     * @author 汪璇
     */
    List<WaybillDto> selectByCondition(WaybillDto waybillDto);

    WWaybill selectByPrimaryKey(Integer waybillId);

    int updateByExampleSelective(@Param("record") WWaybill record, @Param("example") WWaybillExample example);

    int updateByExample(@Param("record") WWaybill record, @Param("example") WWaybillExample example);

    int updateByPrimaryKeySelective(WWaybill record);

    int updateByPrimaryKey(WWaybill record);

    /**
     * 更改状态值（逻辑删除）
     * @param waybillId 运单id
     * @return 影响行数
     * @author 汪璇
     */
    int updateStatusById(Integer waybillId);
}